import { http } from "../../utils/http"

export const getSearch = (key) => async (dispatch) => {
  const { data } = await http.get("/search", {
    params: {
      q: key
    }
  })
  dispatch({ type: "GET_SEARCH", payload: data.data })
}
